//Include("mz.array");

/**
 * @fileoverview 删除数组里指定索引号的项
 * @author meizz
 * @version 20090427
 *
 * @name mz.array.removeAt
 * @namespace mz.array.removeAt
 * @param {Array} array 被处理的数组
 * @param {Number} index 被删除的元素索引
 * @return {Object} 被移除的元素
 */
mz.array.removeAt = function(array, index){
    var n = array.length;
    if (isNaN(index) || (index < 0 || index >= n)) {
        return null;
    }
    var item = array[index];
    var a1 = array.slice(0, index);
    var a2 = array.slice(index + 1, n);
    array.length = 0;
    array.concat(a1, a2);
    return item;
};

